<style>
    @media ( min-width: 992px) {
        .modal-blg {
            width: 95%;
        }
    }
</style>
<link href="./plugin/form/k-form-design.css" rel="stylesheet">
<div class="modal-content">
    <div class="modal-header">
        <button class="close" ng-click="cancel()" type="button">
            <span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
        </button>
        <h4 class="modal-title">单据单</h4>
    </div>
    <div class="modal-body">
        <div class="wrapper wrapper-content animated fadeInRight">
            <div class="row">
                <div class="wrapper wrapper-content animated fadeInRight">
                    <div id="app">
                        <k-form-build :value="jsonData" @submit="handleSubmit" disabled="true" ref='kfb'></k-form-build>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="wrapper wrapper-content animated fadeInRight">
                    <form action="" class="form-horizontal m-t-md " name="myForm"
                          novalidate>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span
                                    class="text-danger">*</span>资产列表:</label>
                            <div class="col-sm-10">
                                <table class="table table-hover" datatable="ed"
                                       dt-column-defs="dtColumnDefs" dt-columns="dtColumns"
                                       dt-instance="dtInstance" dt-options="dtOptions">
                                </table>
                            </div>
                        </div>
                        <div class="form-group" ng-hide="hidectl.flowsuggestlist">
                            <label class="col-sm-2 control-label">审批意见:</label>
                            <div class="col-sm-10">
                                <ul class="list-group">
                                    <li class="list-group-item" ng-repeat="item in spsugguest"><p>
                                        <a class="text-info" style="margin-bottom: 5px">@{{item.assigneename}}
                                            <!--  <span
                                            ng-switch="item.cm_role"> <span
                                                ng-switch-when="owner">-[发起人]</span> <span
                                                ng-switch-when="buyer">-[审批人]</span> <span
                                                ng-switch-when="pt">-[归档]</span> <span ng-switch-default></span>
                                        </span> --> <span>-{{item.taskName}}</span>
                                        </a><br> <span
                                            style="margin-top: 10px; margin-left: 10px">{{item.opinion}}</span>
                                    </p> <small class="block text-muted"><i
                                            class="fa fa-clock-o"></i>处理时间:{{item.endDate}}</small></li>
                                </ul>
                            </div>
                        </div>
                        <div class="form-group" ng-hide="hidectl.flowchart">
                            <label class="col-sm-2 control-label">流程图:</label>
                            <div class="col-sm-10">
                                <iframe allowtransparency="yes" border="0" frameborder="no"
                                        height="300px" marginheight="0" marginwidth="0"
                                        ng-src="{{url}}" scrolling="yes" style="margin-bottom: 50px"
                                        width="90%"></iframe>
                            </div>
                        </div>
                        <div ng-hide="hidectl.flowsuggest" ng-switch="data.pstatus">
                            <div ng-switch-when="rollback"></div>
                            <div ng-switch-default>
                                <div class="form-group" ng-hide="hidectl.pagespbtnhide">
                                    <label class="col-sm-2 control-label"><span
                                            class="text-danger">*</span>审批意见:</label>
                                    <div class="col-sm-10">
										<textarea class="form-control ng-pristine ng-untouched ng-valid ng-empty"
                                                  ng-model="spsuggest"
                                                  placeholder="请输入审批意见" style="padding-bottom: 50px"
                                                  type="text"> </textarea>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <div class="modal-footer" style="text-align: center">
        <div ng-hide="hidectl.pagespbtnhide">
            <div ng-switch="data.pstatus">
                <div ng-switch-when="rollback">
                    <button class="btn btn-primary" ng-click="submit()">提交审批</button>
                </div>
                <div ng-switch-default>
                    <button class="btn btn-primary" ng-click="rollback()">退回</button>
                    <button class="btn btn-warning" ng-click="refuse()">拒绝</button>
                    <button class="btn btn-primary" ng-click="agreen()">同意</button>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="vendor/basket/basket.0.5.2.full.min.js"></script>
<script>
    basket
        .require({url: './plugin/form/vue.min.js', key: 'vue'})
        .then(function () {
            basket.require({url: './plugin/form/k-form-design.umd.min.js', key: 'vue-form'});
        }, function (error) {
            console.log('######', error);
        });
</script>
